package cn.adelyn.blog.blogmanager.dao.mapper;

import cn.adelyn.blog.blogmanager.pojo.model.BlogFileModel;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BlogFileMapper extends BaseMapper<BlogFileModel> {

    void insertBatch(@Param("blogFileModelList") List<BlogFileModel> blogFileModelList);

    @Select("select file_id from blog_file ${ew.customSqlSegment}")
    List<Long> listBlogFiles(@Param(Constants.WRAPPER) Wrapper wrapper);
}
